{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2.10 矩阵的迹"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "矩阵的迹定义为所有对角元的和：\n",
    "\n",
    "$$\n",
    "\\mathrm{Tr}(\\mathbf A)=\\sum_{i} A_{i,i}\n",
    "$$\n",
    "\n",
    "矩阵的 F 范数可以用迹来表示：\n",
    "\n",
    "$$\n",
    "\\|\\mathbf A\\|_F = \\sqrt{\\mathrm{Tr}(\\mathbf{AA^\\top})}\n",
    "$$\n",
    "\n",
    "根据定义，矩阵的迹在转置操作下保持不变：\n",
    "\n",
    "$$\n",
    "\\mathrm{Tr}(\\mathbf A) = \\mathrm{Tr}(\\mathbf A^\\top)\n",
    "$$\n",
    "\n",
    "只要定义合法，乘法的迹满足如下的循环性质：\n",
    "\n",
    "$$\n",
    "\\mathrm{Tr}(\\mathbf{ABC}) = \\mathrm{Tr}(\\mathbf{CAB}) = \\mathrm{Tr}(\\mathbf{BCA})\n",
    "$$\n",
    "\n",
    "或者更一般的有：\n",
    "\n",
    "$$\n",
    "\\mathrm{Tr}(\\prod_{i=1}^n \\mathbf{F}^{(i)}) = \\mathrm{Tr}(\\mathbf{F}^{(n)}\\prod_{i=1}^{n-1} \\mathbf{F}^{(i)})\n",
    "$$\n",
    "\n",
    "一个重要的性质是，对于标量来说，其迹等于它本身：\n",
    "\n",
    "$$\\mathrm{Tr}(a)=a$$"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
